import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/Index.vue'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import Detail from '../views/Detail.vue'
import OrderList from '../views/OrderList.vue'
import Pay from '../views/Pay.vue'
import Cart from '../views/Cart.vue'
import Buy from '../views/Buy.vue'
import orderConfirm from "../views/OrderComfirm.vue"
import OrderCenter from "../views/OrderCenter.vue"
// import { component } from 'vue/types/umd'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Index',

    component: Index,

  },
  {
    path: '/login',
    name: 'Login',

    component: Login,
  },
  {
    path: '/register',
    name: 'Register',

    component: Register,
  },
  {
    path: '/detail/:id',
    name: 'Detail',

    component: Detail
  },
  {
    path: '/orderlist',
    name: 'OrderList',

    component: OrderList
  },
  {
    path: '/cart',
    name: 'Cart',

    component: Cart
  },
  {
    path: '/pay',
    name: 'Pay',

    component: Pay
  },
  {
    path: '/buy/:id',
    name: 'Buy',

    component: Buy
  },
  {
    path: '/orderConfirm',
    name: 'OrderConfirm',

    component: orderConfirm
  },
  {
    path: '/orderCenter',
    name: 'OrderCenter',

    component: OrderCenter
  },

]

const router = new VueRouter({
  routes
})

export default router
